﻿using BasicsClassLibrary.Tool.Configure;
using elasticsearchDemo.Model;
using Nest;

namespace elasticsearchDemo.Comm
{
    public class ElasticSearchConnection
    {
        public static ElasticClient _esClient;        //private readonly ILogger_logger;        //public ElasticSearchConnection(ILoggerlogger)        //{        //    _logger = logger;        //}

        static  ElasticSearchConnection()
        {
            var url = AppHelper.ReadAppSettings("ES", "Url");
            var settings = new ConnectionSettings(new Uri(url));
            _esClient = new ElasticClient(settings);
            

        }

    }
}
